cmake_minimum_required(VERSION 3.15)
set(CMAKE_CXX_STANDARD 17)

#SET(PROJECT_NAME "PerformanceTestFrame")
#project(${PROJECT_NAME})

#宏定义，添加一个包
#soure_name：是一个不带双引号的字符
#soure_dir：是一个不带引号的路径
macro(add_source soure_name soure_dir)
    include_directories(${soure_dir})
    set(hfind ${ARGV1})
    string(APPEND hfind "/*.h")
    set(cppfind ${ARGV1})
    string(APPEND cppfind "/*.cpp")
    file(GLOB name_header ${hfind})
    file(GLOB name_cpp ${cppfind})
    set(AllSource ${AllSource} ${name_header} ${name_cpp})
    source_group(${ARGV0} FILES ${name_header} ${name_cpp})
endmacro(add_source)

#定义变量BIT 32位还是64位
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
	SET(BIT 64)
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
	SET(BIT 32)
endif ( CMAKE_SIZEOF_VOID_P EQUAL 8 )

#add_definitions(-D_UNICODE -DUNICODE)
add_definitions(-DFMT_HEADER_ONLY)

#添加包
add_source(source ../../src)
add_source(common ../../../common)
add_source(json ../../../../../CppThirdPart/jsoncpp)
add_source(json ../../../../../CppThirdPart/fmt)

#link_directories(${PROJECT_SOURCE_DIR}/../../../../../../CppThirdPart/boost/lib)

#添加工程
#add_executable(${PROJECT_NAME} ${AllSource})
#target_include_directories(${PROJECT_NAME} PRIVATE ${BOOST_INCLUDE})
#target_link_libraries(${PROJECT_NAME} *.lib)

